<template>
  <div>
      <brand></brand>
      <h2>{{count}}</h2>
      <button @click="$store.commit('addone')">+1</button>
      <input type="text" name="" id="" v-model.lazy="num"></div>
</template>

<script>

import brand from '../../common/brand.vue'

export default {
    data() {
        return {
            num:'',
        }
    },
    watch:{
        num(){
            this.$store.commit('inputchange',this.num);
        }
    },
    computed:{
        count(){
            return this.$store.state.count
        }
    },
    components:{
        brand,
    }
}
</script>

<style>

</style>